# -*- coding: utf-8 -*-

from project.app import project_app


def celery_worker():
    # 注意Windows系统设置threads，其他(eventlet或gevent)都有问题
    project_app.worker_main(argv=['worker', '-E', '-l', 'info', '-P', 'threads'])
    pass


def async_worker():
    project_app.worker_main(
        argv=['worker', '-E', '-l', 'info', '-P', 'threads', '-Q', 'async_queue', '-n', 'async@%%h'])
    pass


if __name__ == '__main__':
    celery_worker()
    # async_worker()
    pass
